<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ include file="../include/header.jsp" %>
<div id="main">
    <div id="container"> 
        <div id="content">
            <c:if test="${empty requestScope['albums']}">
                <div id="noResult" style="width:300px;margin-top:200px;margin-bottom:200px;" class="message-box clean">
                    Aucun résultat n'a &eacute;t&eacute; trouv&eacute;.
                </div>
            </c:if>
            <c:if test="${!empty requestScope['albums']}">
                <c:forEach var="album" items="${requestScope['albums']}">
                    <div>
                        <div class="entry-content" style="width:235px">
                            <a href="AlbumServlet?action=view&IdAlbum=${album.id}">
                                <span class="slide-title">${album.nom}</span>
                                <span class="slide-description">${album.description}</span>
                                <c:if test="${fn:length(album.photos) gt 0 }">
                                    <img id="url_${album.id}" src="upload/${album.auteur.id}/${album.id}/${album.photos[0].pathThumbHome}"  class="thumbnail"/>
                                </c:if>
                                <c:if test="${fn:length(album.photos) eq 0 }">
                                    <img id="url_${album.id}" src="style/images/thumbnail-default.png"  class="thumbnail"/>
                                </c:if>
                            </a>
                        </div>
                    </div>
                </c:forEach>
            </c:if>
            <!--div>
                <div class="entry-content" style="width:235px">
                    <a href="AlbumServlet?IdAlbum"><span class="slide-title">Envira Media</span>
                        <img src="http://www.chris-wallace.com/gallery/wp-content/themes/gallery/timthumb/timthumb.php?src=http://www.chris-wallace.com/gallery/wp-content/uploads/2009/08/envira-media-300x200.png&w=224&h=220&zc=1"  class="thumbnail" alt="Envira Media" />
                    </a>
                </div>
            </div>
            <div id="nav-below" class="navigation">
                <div class=""><span class="meta-nav" id="moreResult">&laquo; En voir plus &raquo;</span></div>
            </div-->
        </div><!-- #content -->
    </div><!-- #container -->
</div><!-- #main -->
<script type="text/javascript">
    $(document).ready(function(){
        $("#moreResult").click(function(){
            alert('je vais les chercher en ajax, attend moi');
        });
    });
</script>
<%@ include file="../include/footer.jsp" %>